#ifndef COMMANDS_H
#define COMMANDS_H

#include <vector>
#include <map>
#include <string>
using namespace std;

enum ScrCmdType
{
    SCT_NEWSHADER,
    SCT_NEWRENDEROBJECT,
    SCT_NEWMATERIAL,
    SCT_NEWTEXTURE,
    SCT_NEWCOLOR,
    SCT_NEWMESH,
    SCT_NEWPHYSICSOBJECT,   //todo
    SCT_NEWOBJECT,          //todo

    SCT_SENDMESH
};

struct SScrCommand
{
    ScrCmdType Type;
    vector<string> sParams;
};

static vector<SScrCommand> ScrCommands;

void ScrParse(vector<string> sCommand);
void ScrDoCommand(SScrCommand Command);
void ScrDoScript();

class ShaderProgram;
class Color3;
class Texture;
class CMaterial;
class Mesh;
class RenderObject;

class CScrVariables
{
    public:
        void AutoInit();

        map<string, ShaderProgram*> *pShaders;
        map<string, Color3*> *pColors;
        map<string, Texture*> *pTextures;
        map<string, CMaterial*> *pMaterials;
        map<string, Mesh*> *pMeshes;
        map<string, RenderObject*> *pRenderObjects;

        vector<string> RenderObjectNames;
        vector<string> ShaderNames;
} extern ScrVariables;

#endif
